import request from '../utils/request'

// 获取土特产列表   name    pageNum    pageSize
export const getFoodList = (params) => {
    return request.get('/app/findAllCommodity', params)
}

// 添加土特产 cname,cpicture,cprice: ,curl: ,notice: ,sid
export const addFood = (params) => {
    return request.post('/addCommodity', params)
}

// 修改土特产 cname,cpicture,cprice: ,curl: ,notice: ,sid cid
export const updateFood = (params) => {
   return request.put('/updateCommodity', params)
}

// 删除土特产 cid
export const deleteFood = (id) => {
    return request.del(`/deleteCommodity?cid=${id}`)
}

// 获取土特产详情 cid
export const foodDetails = (params) => {
    return request.get('/app/findCommodity' , params)
}

// 获取土特产店铺列表 name    pageNum    pageSize
export const storeList = (params) => {
    return request.get('/app/findShop', params)
}

// 添加土特产店铺  	sname: ,spicture: ,sscore: 
export const addStore = (params) => {
    return request.post('/addShop', params)
}

// 修改土特产店铺 	sname: ,spicture: ,sscore, sid
export const updateStore = (params) => {
    return request.put('/updateShop', params)
}

// 删除土特产店铺 sid
export const  deleteStore = (id) => {
    return request.del(`/deleteShop?sId=${id}`)
}

// 获取土特产店铺详情  compageNum compageSize    pageNum   pageSize  sId
export const storeDetails = (params) => {
    return request.get('/app/getShoBysId', params)
}